package com.e3.sysmg.security.client;

import com.e3.web.core.client.DOMHelper;
import com.e3.web.core.client.SuperEntryPoint;
import com.extjs.gxt.ui.client.widget.LayoutContainer;


public class SecurityEntryPoint extends SuperEntryPoint {
	
	private String getSecurityModuleCode(){
		return DOMHelper.getElementAttributeValue("SECURITY");
	}

	@Override
	protected LayoutContainer getUIComponent() {
		String sec = getSecurityModuleCode();
		if("ModuleUI".equalsIgnoreCase(sec)){
			return new ModuleUI();
		}
		if("RoleUI".equalsIgnoreCase(sec)){
			return new RoleUI();
		}
		if("UserUI".equalsIgnoreCase(sec)){
			return new UserUI();
		}
		return new LayoutContainer();
	}
}
